﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace AudioCore.Common
{
    public static class RegexUtils
    {
        public static string GetText(string source, string reg)
        {
            Regex regex = new Regex(reg, RegexOptions.Multiline | RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace | RegexOptions.CultureInvariant);
            Match match = regex.Match(source);
            if (match != null)
            {
                return match.Groups[1].Value;
            }
            return string.Empty;
        }
    }
}
